// ==UserScript==
// @name           OGame - Auto Galaxy Navigation
// @namespace      ogame_autogalaxynav
// @include        */game/index.php?page=galaxy*
// ==/UserScript==

var autoGalaxyNavCount = 0;

function autoGalaxyNav() {
	for (x = 0; x < document.forms[0].elements.length; x++) {
		if (document.forms[0].elements[x].name == "system") {
			if (document.forms[0].elements[x].value == "499") {
				return;
			}
		}
	}
	setTimeout('galaxy_submit(\'systemRight\');', 1000 + parseInt(5000 * Math.random()));
}

autoGalaxyNav();
